package org.example.service.impl;

import org.example.dao.ProductDao;
import org.example.dao.impl.ProductDaoImpl;
import org.example.entity.Product;
import org.example.service.ProductService;

public class ProductServiceImpl implements ProductService {
    ProductDao productDao = new ProductDaoImpl();

    //进货
    @Override
    public void updStock(int number, String name){
        productDao.updProductImpl(number,name);
    }

    //根据商品名字查询价格
    @Override
    public double getPriceByProName(String proName){
        return productDao.getPriceByProName(proName);
    }

    //添加商品
    @Override
    public void addPro(Product product){
        productDao.addProduct(product);
    }
}
